/**
 * @file oled_ssd1306.h
 * @brief Header file for SSD1306 OLED display driver functions and definitions.
 *
 * This file contains the function declarations and macro definitions for controlling
 * the SSD1306 OLED display. It provides the necessary interfaces for initializing
 * the display, setting display parameters, drawing pixels, and rendering text and images.
 *
 * @author Maker Studio
 * @license Apache 2.0
 *
 * This code is open-sourced under the Apache 2.0 license. When using open-source libraries
 * or code, please ensure to acknowledge the original authors and sources.
 */

#ifndef OLED_SSD1306_H
#define OLED_SSD1306_H
#include <stdint.h>     
#include <stdio.h>      
#include <stddef.h>     
#include "iot_gpio.h"  
#include "../inc/iot_gpio_ex.h"
#include "iot_i2c.h"   
#include "iot_errno.h" 
#include "../inc/iot_gpio_ex.h"
#include "../inc/oled_fonts.h"
#include "../inc/oled_ssd1306.h"
#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
#define OLED_I2C_IDX 1
#define OLED_I2C_BAUDRATE (400 * 1000) 
#define OLED_WIDTH (128)
#define OLED_I2C_ADDR 0x3C 
#define OLED_I2C_CMD 0x00 
#define OLED_I2C_DATA 0x40 
#define DELAY_100_MS (100 * 1000)

uint32_t OledInit(void);
void OledSetPosition(uint8_t x, uint8_t y);
void OledFillScreen(uint8_t fillData);
uint32_t WriteData(uint8_t data);

enum Font {
    FONT6x8 = 1,
    FONT8x16
};
typedef enum Font Font;


void OledShowChar(uint8_t x, uint8_t y, uint8_t ch, Font font);
void OledShowString(uint8_t x, uint8_t y, const char* str, Font font);

#endif 
